package festival.board;

public class PalaceTile extends VillageTile {
	private int mPlayerId;
	private boolean mHeldPalaceFestival;
	private int mPalaceSize;

	public PalaceTile(int tileID, int tileSize, int playerId, int cityID, int palaceSize) {
    	super(tileID, tileSize);
		mPlayerId = playerId;
		this.mCityID = cityID;
		mHeldPalaceFestival = false;
		mPalaceSize = palaceSize;
	}

	public int getPlayerId() {
		return mPlayerId;
	}
	
	public PalaceTile(int playerID) {
		super();
		mPlayerId = playerID;
		mPalaceSize = 2;
	}

	public boolean acceptPlace(int[] coordinates, TilePlacer tp, boolean apply) {
		return tp.place(coordinates, this, apply);
	}

	public boolean canBeStackedOn() {
		return false;
	}

	@Override
	public int getLandType() {
		return 3;
	}

	@Override
	public boolean canStack() {
		return true;
	}
	
	public boolean canHoldPalaceFestival() {
		return !mHeldPalaceFestival;
	}
	
	public int getPalaceSize() {
		return mPalaceSize;
	}
	
	public void upgrade(int newPalaceSize) {
		mHeldPalaceFestival = false;
		mPalaceSize = newPalaceSize;
	}

//	@Override
//	public void acceptDraw(int[] coordinates, TileDrawer td) {
//		td.draw(coordinates, this);
//	}
}
